Luminosity Mask Drive-Thur 2 (LMDT)

__________________________
How to Install the Plug-in
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Copy the “LMDT” folder and paste it into a GIMP 3 plug-ins folder. You can find GIMP's plug-in folder locations in Gimp 3's main window menu "/Edit/Preferences" dialog. There's a “Folders” item which has the plug-in paths.

_______________________________________
Where to Find the Plug-in Inside GIMP 3
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
After copying and pasting the LMDT folder, restart GIMP. On inspection, the Luminosity Mask Drive-Thru plug-in should list under Gimp 3's main window menu, "/Layer/Mask".

_______________________________________
What Can Luminosity Mask Drive-Thru Do?
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
LMDT creates masked layers from selected layers with or without selection. The mask-types have different mask influence scope, allowing the user to focus on a specific luminosity-based image area. In the LMDT plug-in dialog, the mask-type scope is sorted from the top as least to most.

Each selected layer undergoes the same mask cycling.

If there is an image selection, each generated mask is combined with the selection.

At the end of mask processing, selected layers and image selection are both restored.

If LMDT fails to create a mask-type, a failed mask-type message dialog will show after mask processing is complete. Mask-types are dependent on pixels to create mask from, so it always possible than any of the mask-types will fail. Also during processing as mask scope becomes lesser, the number of selection pixels for mask creation decrease, possibly to zero.

____________________________________
How are LMDT's Luminosity Masks Made
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
The technique splits an image into light and dark selection channels. I call these polar mask-groups. They create mask-typed mask with succesive processing of a mask-type's predecesor mask channel. During channel initialization, the first channel is made from a layer's component selection. Then during each stage of mask-type processing, where the mask's scope becomes less and less, a mask-type channel is created by inverting the predecessor's channel and subtracting the inversion from the same, original, predecessor's channel.

Midtone masks are created by subtracting complimentary polar mask-type from an all-selection. The complimentary colors are in the same sort order found in the Light and Dark mask-groups. A Midtone mask-type is thus dependent on both Light and Dark mask-type channel generation. A Midtone mask-type fails if either the Light or Dark mask-type channel is absent due to a failure in their channel-generation.

________________________
Gimp Python and Linux OS
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Linux users need to make LMDT's three '.py' (Python) files executable.

______________________________________________________
Developed on Windows 10, GIMP 3.0.0-RC1.
Get the latest: github.com/gummyCowboy/GIMP-python-fu
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Update Log
	v2.13 Release Date: November 27, 2024
		• Fixed
			» LMDT leaving an empty mask group behind when all masks fail.
			» Midtone options still producing in inverse order.
			» a Midtone dependency causing the Greatest to fail.

		• Improved 
			» group layer naming so there are no duplicate names.
			» layer position when the layer has no siblings. The layer gets relocated to its parent's parent.

	v2.12 Release Date: November 26, 2024
		• Fixed a mis-configured dark mask generation function.

	v2.11 Release Date: November 24, 2024
		• Fixed mask-type descriptors displaying in inverted order.
		• Fixed saved channels being mixed together for different Alpha Channels.

	v2.1 Release Date: November 24, 2024
		• Fixed
			» error when LMDT was called with a selected layer group.
			» missing language tranlation.

		• Added
			» All and None buttons to the mask groups. Quickly set mask-type CheckButton.
			» a Group CheckButton. When selected, generate layer group for mask layer when there is more than one of a type (Alpha Channel, mask group, mask-type).

		• Changed the Alpha Channel option type to CheckButton. Generate more than one Alpha Channel per run.

	v2.03 Release date: November 22, 2024
		• Fixed several flaws in the Midtone mask-type:
			» The mask-group was cycling was inverted, so the output wasn't sorted or identified correctly.
			» The mask generation sourcing was incorrect, causing the Minimal mask-type to fail.

	v2.02 Release date: November 22, 2024
		• Added language translator to LMDT's fail message.
		• Fixed a problem where mask-type failure was not reported.

	v2.01 Release date: November 22, 2024
		• Fixed the implementation of the channel selector. Renamed the option, "Alpha Channel".
		• Removed an uneccessary desaturation in the output processing.

	v2: Release date: November 21, 2024
